DIGITAL INFORMATION 04

OPENING QUESTION:

Please write S.o.S! in hex

in hex (formatting counts!)

OBJECTIVE:  During today's class I will be able to:

  • I will be able to model data "overflow" during today's class.
  • I will be able to define data "round-off" errors and explain how they occur during today's class.

WORDS FOR TODAY:

I STRONGLY URGE YOU TO START A DECK OF FLASH CARDS HERE

  • innovation: "A new or improved idea, device, product, etc, or the development thereof
  • prototype: "A proof of concept"
  • CPU: Central Processing Unit
  • Binary: 0's & 1's - Base2
  • Octal: Base8
  • Hexadecimal Base16 - 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
  • Byte: one binary 'word'
  • Bit: one binary 'letter' - either a 0 or 1, short for binary digit!
  • Overflow Errors
  • Round-off Errors
  • Abstraction - "The process of masking complex processes with user-friendly interfaces"

WORK O' THE DAY

You've been working at the local grocery store for a while and you finally have some cash in your pocket. One day you see a cool looking (but kind of beat-up), 1977 Toyota Landcruiser in the parking lot on sale for $500.

You talk to the owner who encourages you to take a look at the vehicle. You sit in the driver seat, turn on the motor and look at the mileage on the dashboard. Oddly it shows that the current mileage on that vehicle is:

000560

Hmmmm... you are skeptical that the almost 50 year old vehicle has only 560 miles on it.

Why is that?

═══════════════════════════

Take a look at the code.org "Odometer Widget"

Have a look at the binary values. Start the widget running and notice how the digits roll over from 0 to 1 throughout.

With that in mind, what is the highest possible value that can be shown in binary?

What is that value in decimal?

What is that value in hex?

STOP the odometer

Now please predict what will happen when the odometer gets to the largest value it can possible reach--- and then we add 1 to that number? Please discuss

═══════════════════════════

That is an example of one of our learning targets --- a concept known as overflow.

Overflow occurs when there isn't sufficient physical space to store our data.

When I was a kid, it was fairly typical for a car odometer to contain 5 digits! In fact it was a pretty big deal to have the odometer "go around" (which is to say reset from 99999 to 00000). How is that significant to our conversation of overflow? Please discuss!

 

 

 

When the odometer for a 1969 Mustang convert able (for example) reached 99,999 miles that was as far as it could go. If/when you drove ONE MORE MILE, the odometer dutifully added 1 more mile to the existing odometer but it couldn't actually do the math because there were only 5 digits available. Therefore the odometer was 'reset' from 99,999 miles to 00000 miles!

═══════════════════════════

  • What value would cause your Flippy Do to overflow?

  • What adaptation could you make to the Flippy Do to represent that value?

  • Using your newly adapted Flippy Do, how many total numbers can be represented?

 

═══════════════════════════

Now please take a few moments to research the term "round-off" errors in computer programming (That is an AP Learning Target By the By)

The good news is there is LOTS of information on the topic. The bad news is much of that is badly written. Your job is to make it make sense and be prepared to do that in a slide or two that you may be asked to present to the class.

Hint: DO NOT splash a paragraph or two of text on the screen and then read it to us (That's a VERY BIG no-no!

HINT: Think math! Why do your math teachers insist (quite correctly) that giving an answer as a fraction value is more precise than giving an answer in decimal form.